Skip to content

Account data export; owner handles old deletion requests; patch functions deps - #142

Merged
Darknode-Official merged 1 commit into
mainfrom
feat/account-export
Nov 28, 2026
Merged

Darknode-Official merged 1 commit into
mainfrom
feat/account-export

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

Follows #141.

Account data export. GET /api/account/export returns everything Darknode's servers hold about the caller as one JSON file:

  • the Auth record (email, sign-in methods, created and last sign-in times);
  • users/{uid} and its subcollections;
  • usage;
  • requests and reports they filed;
  • their waitlist entry;
  • workspace and vault memberships;
  • the personal workspace's monitors, deadlines and API keys.

Pairing keys and key secrets are redacted. The security graph already has its own export, so the file points to it. In the UI: Deck Settings > Data > Your account data > Download. Privacy text updated.

Old deletion requests. Before #141, deletionRequests docs had no reader. A new owner-only /api/admin/deletions lists them and carries out one deletion, using the same steps users run themselves. It only works for an account that has a request doc. The admin panel gets an "Account deletion requests" section. The request doc is now deleted last, after the sign-in, so a failed run can be retried.

Dependabot. functions/ overrides glob ^14.0.2 and fast-xml-parser ^5.12.0. Firebase Admin, Firebase Functions, rimraf and index.js still load. functions/ is not deployed.

Verified

  • npm test: 5178 passed, with 4 new tests: export contents and redaction, Firestore value decoding, admin list/delete only for accounts that asked, and a failed run keeping the request doc.
  • Staging Worker 473e4aa4, with a throwaway account seeded with a users doc: the export returned the account, profile, empty memberships, monitors, deadlines and keys. The admin route as a non-owner gave 403. The account was then deleted through /api/account/delete.

Not tested: the admin list and delete with the owner's token (I have none). The Deck Download button was not clicked (needs a verified account; same api() helper as the tested route).

… functions deps

- GET /api/account/export (signed in): everything the server holds about the
  caller as one JSON file: Auth record, users/{uid} and its subcollections,
  usage, requests and reports they filed, waitlist entry, memberships,
  personal monitors, deadlines and API keys (key secrets and pairing keys
  redacted). Deck Settings > Data > Your account data > Download.
- Owner-only /api/admin/deletions: lists deletionRequests filed before
  self-service existed and runs the same full deletion for one of them. Only
  an account with a request doc can be deleted this way. The request doc is
  now removed last, after the sign-in, so a failed run can be retried. Admin
  panel gets an "Account deletion requests" section.
- Deletion steps moved into deleteAccountData(), shared by both routes.
- functions/: overrides glob ^14.0.2 and fast-xml-parser ^5.12.0 (Dependabot
  alerts; functions/ is not deployed).
@Darknode-Official
Darknode-Official merged commit b19499d into main Nov 28, 2026
10 checks passed
@Darknode-Official
Darknode-Official deleted the feat/account-export branch November 28, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant